package com.saul.datastructure.linktable;

/**
 * @author 罗泽民
 * @description 链表测试
 * @date 2020/11/18 10:53
 */
public class Test {
    public static void main(String[] args) {
//        testSingleLinkedList();
        String state = "refresh_appkey";
        for (String s : state.split("_")) {
            System.out.println(s);
        }
        String stsssate = "refresh";
        for (String s : stsssate.split("_")) {
            System.out.println(s);
        }
    }

    public static void testSingleLinkedList() {
        SingleLinkedList singleList = new SingleLinkedList();
        singleList.addHead("A");
        singleList.addHead("B");
        singleList.addHead("C");
        singleList.addHead("D");
        //打印当前链表信息
        singleList.display();
        //删除C
        singleList.delete("C");
        singleList.display();
        //查找B
        System.out.println(singleList.find("B"));
        //
    }
}
